package cn.wsalix.order.entity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.FetchType;
import javax.persistence.Lob;
import javax.persistence.Table;

import lombok.Data;
import lombok.EqualsAndHashCode;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import cn.anlaser.entity.SimpleEntity;
import cn.wsalix.type.PayTypeEnum;

@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "PAY_NOTIFY")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@EntityListeners({ AuditingEntityListener.class })
@Data
@EqualsAndHashCode(callSuper = false)
public class PayNotify extends SimpleEntity {
	/**
		 * 
		 */
	private static final long serialVersionUID = -5832399314925731245L;
	private String formJson;
	@Lob
	@Basic(fetch = FetchType.LAZY)
	@Column(name = "REQUEST_BODY", columnDefinition = "TEXT", nullable = true, length = 100000)
	private String requestBody;
	private PayTypeEnum payType;
}
